<script>
export default {
  name: 'InputNumber',
  functional: true,
  render(createElement, context) {
    const { listeners } = context
    const inputLister = listeners.input

    return (
      <input type="text" class="input-number" onInput={(e)=>{
        const {target} = e
        let value = target.value
        value = value.replace(/\D/g, '')
        target.value = value
        inputLister(value)
      }} />
    )
  }
}
</script>

<style>

</style>